package com.happyclub.configuation;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DruidConfiguation {

    /**
     * 连接Oracle
     * @return
     */
        @Bean
        public DruidDataSource druidDataSource(){
            DruidDataSource druidDataSource =  new DruidDataSource();
            druidDataSource.setDriverClassName("oracle.jdbc.OracleDriver");
            druidDataSource.setUrl("jdbc:oracle:thin:@192.168.1.52:1521:orcl");
            /*druidDataSource.setUrl("jdbc:oracle:thin:@192.168.43.5:1521:orcl");*/
            druidDataSource.setUsername("scott");
            druidDataSource.setPassword("wei3296");
            return druidDataSource;
        }
}
